package com.test.aop;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAopAnnotationInterceptor implements MethodInterceptor {
    @Nullable
    @Override
    public Object invoke(@Nonnull final MethodInvocation invocation) throws Throwable {
        System.out.println("MyAopAnnotationInterceptor start");
        try {
            return invocation.proceed();
        } finally {
            System.out.println("MyAopAnnotationInterceptor end");
        }
    }
}
